package com.ssy.lingxi.logistics.model.request;

import com.ssy.lingxi.logistics.api.validate.InEnum;
import com.ssy.lingxi.logistics.model.enums.CommonBooleanEnum;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 发货地址请求实体类
 *
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/13
 */
@Data
public class ShipperAddressRequest implements Serializable {

    private static final long serialVersionUID = 6364366984501667899L;

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = {Update.class})
    private Long id;

    /**
     * 发货人名称
     */
    @NotBlank(message = "发货人名称不能为空", groups = {Add.class, Update.class})
    private String shipperName;

    /**
     * 省编号
     */
    @NotBlank(message = "省编号不能为空", groups = {Add.class, Update.class})
    private String provinceCode;

    /**
     * 省名称
     */
    @NotBlank(message = "省名称不能为空", groups = {Add.class, Update.class})
    private String provinceName;

    /**
     * 市编号
     */
    @NotBlank(message = "市编号不能为空", groups = {Add.class, Update.class})
    private String cityCode;

    /**
     * 市名称
     */
    @NotBlank(message = "市名称不能为空", groups = {Add.class, Update.class})
    private String cityName;

    /**
     * 区编号
     */
    private String districtCode;

    /**
     * 区名称
     */
    private String districtName;

    /**
     * 详细地址
     */
    @NotBlank(message = "详细地址不能为空", groups = {Add.class, Update.class})
    private String address;

    /**
     * 街道编码
     */
    private String streetCode;

    /**
     * 街道名称
     */
    private String streetName;

    /**
     * 邮编
     */
    private String postalCode;

    /**
     * 手机区号
     */
    @NotBlank(message = "手机区号不能为空", groups = {Add.class, Update.class})
    private String areaCode;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号码不能为空", groups = {Add.class, Update.class})
    private String phone;

    /**
     * 电话号码
     */
    private String tel;

    /**
     * 是否默认 0-否 1-是
     */
    @InEnum(value = CommonBooleanEnum.class, groups = {Add.class, Update.class})
    private Integer isDefault;


    public interface Add {
    }

    public interface Update {
    }
}
